//
//  SopViewCell.m
//  DigiOps
//
//  Created by app on 2018/7/18.
//  Copyright © 2018年 俞渊华. All rights reserved.
//

#import "SopPhotoViewCell.h"

@implementation SopPhotoViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
//    [self.sopInfo setBackgroundImage:[UIImage imageNamed:@"sop_info"] forState:UIControlStateNormal];
//    [self.sopInfo addTarget:self action:@selector(infoClick) forControlEvents:UIControlEventTouchUpInside];
    [self.okButton addTarget:self action:@selector(infoClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.notokButton addTarget:self action:@selector(infoClick:) forControlEvents:UIControlEventTouchUpInside];
    [self.view setBackgroundColor:XMColor(241, 245, 247)];
    [self.notokButton setBackgroundColor:[UIColor lightGrayColor]];
//    self.okButton.imageEdgeInsets = UIEdgeInsetsMake(12, (SCREEN_WIDTH- 9)/2, 12, (SCREEN_WIDTH- 9)/2);
//    if (SYSTEM_VERSION_GREATER_THAN(@"11.0")) {
//        self.okButton.imageEdgeInsets = UIEdgeInsetsMake(12, (SCREEN_WIDTH- 5)/2, 12, (SCREEN_WIDTH- 5)/2);
//    }

}
-(void)infoClick:(UIButton*)sender
{
    if (self.block) {
        self.block(sender);
    }
    //    [sender setBackgroundColor:DGColor];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (SopPhotoViewCell *)cellWithTableView:(UITableView *)tableView {
    static NSString *ID = @"SopPhotoViewCellID";
    
    SopPhotoViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[NSBundle mainBundle] loadNibNamed:@"SopPhotoViewCell" owner:nil options:nil].lastObject;
        cell.backgroundColor=[UIColor whiteColor];
        
    }
    return cell;
}
@end
